package com.hjc.oj.judge.codesandbox;

import com.hjc.oj.judge.codesandbox.model.ExecuteCodeRequest;
import com.hjc.oj.judge.codesandbox.model.ExecuteCodeResponse;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;



@Log4j2
@AllArgsConstructor
public class CodeSandBoxProxy implements  CodeSandBox{

    private final CodeSandBox codeSandBox;


    @Override
    public ExecuteCodeResponse executeCode(ExecuteCodeRequest executeCodeRequest) {
        log.info("代码沙箱请求信息："+executeCodeRequest.toString());
        ExecuteCodeResponse executeCodeResponse = codeSandBox.executeCode(executeCodeRequest);
        log.info("代码沙箱相应信息："+executeCodeResponse.toString());
        return executeCodeResponse;
    }


}
